package com.boarsoft.boar.demo.user.service;

import java.math.BigDecimal;

import com.boarsoft.boar.demo.user.entity.PocAccount;

/**
 * @ClassName:  accountService   
 * @Description:账户服务
 * @author: 
 * @date:   2019年2月15日 上午9:50:59   
 *     
 * @Copyright: 2019
 */
public interface PocAccountService {
	
	/**
	 * @Title: add   
	 * @Description:  增加新账户
	 * @param:  tenantId
	 * @param:  account
	 * @return: boolean      
	 * @throws
	 */
	boolean add(int tenantId, PocAccount p);

	/**
	 * @Title: update   
	 * @Description:  修改账户
	 * @param:  tenantId
	 * @param:  account
	 * @return: boolean      
	 * @throws
	 */
	boolean update(int tenantId, PocAccount p);
	
	/**
	 * @Title: findById   
	 * @Description:  查找账户
	 * @param:  tenantId
	 * @param:  accountId
	 * @return: PocAccount      
	 * @throws
	 */
	PocAccount find(int tenantId, int accountId);
	
	/**
	 * @Title: accountTransfer   
	 * @Description:  转账
	 * @param:  fromAccount
	 * @param:  toAccount
	 * @param:  amount 金额
	 * @return: boolean      
	 * @throws
	 */
	boolean accountTransfer(String fromAccount, String toAccount, BigDecimal amount);

	/**
	 * @Title: accountReverse   
	 * @Description:  冲正
	 * @param:  logId
	 * @param:	logDate
	 * @return: boolean      
	 * @throws
	 */
	boolean accountReverse(String logId, String logDate);

}
